[AutoDiff] Fix differentiable_function-related specialization crashes.#29800
Conversation
Fix crashes related to generic specialization of `partial_apply` operands to `differentiable_function` instructions. `differentiable_function` requires derivative function operand types to match expected derivative function types computed from the original function operand's type, so operands cannot be specialized individually without specializing the others. Resolves TF-891 and TF-1126.
|
@swift-ci Please test tensorflow |
marcrasi
left a comment
There was a problem hiding this comment.
Ooo nice.
Seems like we'll want to allow specialization of these things eventually because specialization can make things much faster?
rxwei
left a comment
There was a problem hiding this comment.
I think eventually we'll want specialization to apply to the @differentiable function, not operands to the differentiable_function instruction.
Yes, allowing specialization if possible would be ideal! A nice approach might be to relax This avoids requiring that all function-type-rewriting transformations (e.g. generic specialization, loadable-by-address) must update original/derivative function types consistently. |
Fix crashes related to generic specialization of
partial_applyoperands todifferentiable_functioninstructions.differentiable_functionrequires derivative function operand types to matchexpected derivative function types computed from the original function operand's
type, so operands cannot be specialized individually without specializing the
others.
Resolves TF-891 and TF-1126.
Fixed verification error from TF-1126: